<script>
	
	export default {
		onLaunch: function() {
			console.log('App Launch')
		},
		onShow: function() {
			console.log('App Show')
			// let token = localStorage.getItem('userToken');
			// let mobile = localStorage.getItem('mobile');
			// if(token != null){
			// 	if(mobile == '' || mobile == null || mobile === undefined){
			// 		uni.reLaunch({ //底部导航跳转方式
			// 			url: '/pages/shop/bind_phone'
			// 		});
			// 	}
			// }else{
				
			// }
			
			
			//开启是否最新版
			const updateManager = uni.getUpdateManager();
			
			updateManager.onCheckForUpdate(function (res) {
				console.log("检测是否最新版")
				 console.log(res.hasUpdate);
			  // 请求完新版本信息的回调
			  if(res.hasUpdate){
				  updateManager.onUpdateReady(function (res) {
				    uni.showModal({
				      title: '更新提示',
				      content: '新版本已经准备好，是否重启应用？',
				      success(res) {
				        if (res.confirm) {
				          // 新的版本已经下载好，调用 applyUpdate 应用新版本并重启
				          updateManager.applyUpdate();
				        }
				      }
				    });
				  
				  });
				  
				  updateManager.onUpdateFailed(function (res) {
				    // 新的版本下载失败
					uni.showModal({
					  title: '更新提示',
					  content: '新的版本更新失败，请联系管理员！',
					  success(res) {
					    if (res.confirm) {
					      
					    }
					  }
					});
				  });
			  }
			
			});
			
			
			
		},
		onHide: function() {
			console.log('App Hide')
		},
		
	}
</script> 
<!-- <script src="weui/weui.min.js"></script> -->
<style lang="scss">
	@import url('common/uni.css');
	// @import url('custome/iconfont.css');
	// @import url('custome/custome.css');
	// @import url('common/weui.css');
	
	/* #ifdef H5 */ uni-page-head { display: none; } /* #endif */
	/* #ifdef H5 */
	 /* 页面A */
	 uni-page[data-page="pages/login/login_pw"] .uni-page-head-hd {
		display: none;
	 }
	 uni-page[data-page="pages/shop/shop"] .uni-page-head-hd {
	 	display: none;
	 }
	 uni-page[data-page="pages/mypage/mypage"] .uni-page-head-hd {
	 	display: none;
	 }
	 /* #endif */
	 button[type=primary]{
	 	background-color: #000;
	 }
	 .button-hover[type=primary]{
	 	background-color: rgba(0, 0, 0, .8);
	 }
	 .uni-body{
	 	background-color: #f6f6f6;
	 }
	 .uni-tabbar{
		 color: #1f1f1f;
		 background-color: #fff;
	 }
	 .uni-tabbar .uni-tabbar__bd{
	 	position: relative;
	 	height: 120rpx;
	 }
	 /*流水页面 时间选择*/
	 .con-list{
	 	display: flex;
	 	justify-content: center;
	 	align-items: center;
	 	// height: 200px;
	 	.con-time{
	 		font-size: 24rpx;
	 		text:first-child{
	 			font-weight: 700;
	 			color: #000;
	 		}
	 		text:last-child{
	 			color: #666;
	 		}
	 		text{
	 			display: block;
	 		}
	 	}
	 	.con-name{
	 		color: #000;
	 		font-size: 28rpx;
	 		border-left: 1px solid rgba(0, 0, 0, .1);
	 		border-right: 1px solid rgba(0, 0, 0, .1);
	 	}
	 	.con-price{
	 		color: #000;
	 		font-size: 28rpx;
	 		font-weight: 700;
	 	}
		.view-all{
			text-align: right;
			text-align: center;
			display: block;
			font-size: 28rpx;
			padding: 4rpx ;
			color: #4371FA;
			border: 1px solid #4371FA;
			border-radius: 8rpx;
		}
	 }
</style>

